home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Sample.bin / BigContrastMetalTheme.java < prev    next >
Text File  |  1998-06-30  |  3KB  |  82 lines

  1. /* 
  2.  * @(#)BigContrastMetalTheme.java    1.4 98/03/10
  3.  * 
  4.  * Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  */
  20.  
  21.  
  22. import com.sun.java.swing.plaf.*;
  23. import com.sun.java.swing.plaf.metal.*;
  24. import com.sun.java.swing.*;
  25. import com.sun.java.swing.border.*;
  26. import java.awt.*;
  27.  
  28. /**
  29.  * This class describes a theme using "green" colors.
  30.  *
  31.  * @version 1.4 03/10/98
  32.  * @author Steve Wilson
  33.  */
  34. public class BigContrastMetalTheme extends ContrastMetalTheme {
  35.  
  36.     public String getName() { return "Low Vision"; }
  37.  
  38.     private final FontUIResource controlFont = new FontUIResource("Dialog", Font.BOLD, 24);
  39.     private final FontUIResource systemFont = new FontUIResource("Dialog", Font.PLAIN, 24);
  40.     private final FontUIResource windowTitleFont = new FontUIResource("Dialog", Font.BOLD, 24);
  41.     private final FontUIResource userFont = new FontUIResource("SansSerif", Font.PLAIN, 24);
  42.     private final FontUIResource smallFont = new FontUIResource("Dialog", Font.PLAIN, 20);
  43.  
  44.  
  45.     public FontUIResource getControlTextFont() { return controlFont;}
  46.     public FontUIResource getSystemTextFont() { return systemFont;}
  47.     public FontUIResource getUserTextFont() { return userFont;}
  48.     public FontUIResource getMenuTextFont() { return controlFont;}
  49.     public FontUIResource getWindowTitleFont() { return windowTitleFont;}
  50.     public FontUIResource getSubTextFont() { return smallFont;}
  51.  
  52.     public void addCustomEntriesToTable(UIDefaults table) {
  53.          super.addCustomEntriesToTable(table);
  54.  
  55.          final int internalFrameIconSize = 22;
  56.          table.put("InternalFrameTitlePane.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(internalFrameIconSize));
  57.          table.put("InternalFrameTitlePane.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(internalFrameIconSize));
  58.          table.put("InternalFrameTitlePane.iconizeIcon", MetalIconFactory.getInternalFrameMinimizeIcon(internalFrameIconSize));
  59.          table.put("InternalFrameTitlePane.altMaximizeIcon", MetalIconFactory.getInternalFrameAltMaximizeIcon(internalFrameIconSize));
  60.  
  61.  
  62.     Border blackLineBorder = new BorderUIResource( new MatteBorder( 2,2,2,2, Color.black) );
  63.     Border textBorder = blackLineBorder;
  64.  
  65.         table.put( "ToolTip.border", blackLineBorder);
  66.     table.put( "TitledBorder.border", blackLineBorder);
  67.  
  68.  
  69.         table.put( "TextField.border", textBorder);
  70.         table.put( "PasswordField.border", textBorder);
  71.         table.put( "TextArea.border", textBorder);
  72.         table.put( "TextPane.font", textBorder);
  73.  
  74.         table.put( "ScrollPane.border", blackLineBorder);
  75.  
  76.         table.put( "ScrollBar.width", new Integer(25) );
  77.  
  78.  
  79.  
  80.     }
  81. }
  82.